<template>
  <el-dialog
    class="orderDialog"
    :append-to-body="true"
    :visible="showDialog"
    :show-close="true"
    :destroy-on-close="true"
    width="60%"
    :lock-scroll="true"
    @open="openDialog"
    @close="cancel"
  >
    <el-table :data="infoValue" v-loading="tableLoading">
      <el-table-column
        prop="name"
        label="姓名"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="sex"
        label="性别"
        align="center"
      ></el-table-column>
      <el-table-column prop="level" label="运动评估" align="center">
      </el-table-column>
      <el-table-column prop="value" label="运动步数" align="center">
      </el-table-column>
    </el-table>
  </el-dialog>
</template>

  <script>
import moment from "moment";

export default {
  props: {
    showDialog: {
      type: Boolean,
      default: false,
    },
    classId: {
      type: Number,
      // default: '',
    },
    schoolCode: {
      type: String,
      default: "",
    },
    infoValue: {
      type: Array,
      default: "",
    },
  },
  data() {
    return {
      total: 0,
      params: {
        pageNum: 1,
        pageSize: 15,
      },
      title: "",
      tableDataList: [],
      indCode: "",
      tableLoading: false,
      tableColums: [],
      code: this.mgtOrgCode,
      mingxiList: [],
    };
  },
  watch: {
    mgtOrgCode() {
      // console.log(oldval);
      this.code = this.mgtOrgCode;
    },
  },
  methods: {
    async openDialog() {},
    cancel() {
      this.$emit("update:showDialog", false);
      (this.total = 0),
        (this.params = {
          pageNum: 1,
          pageSize: 15,
        }),
        (this.title = "");
      this.code = this.mgtOrgCode;
      this.tableDataList = [];
    },
    pageChange(pageNo) {
      this.params.pageNum = pageNo;
      this.openDialog();
    },
    sizeChange(pageSize) {
      this.params.pageSize = pageSize;
      this.openDialog();
    },

    //表格序号
    customeIndex(index) {
      return index + 1 + (this.params.pageNum - 1) * this.params.pageSize;
    },
  },
};
</script>

  <style lang='scss' scoped>
.orderDialog {
}
</style>
